getSource

open fun getSource(): Source

Gets the current source from the playlist.

If the playlist is null, empty, or the current index is invalid, this method returns null. Otherwise, it calculates the actual index within the playlist bounds (handling negative indices or indices larger than the playlist size by wrapping around) and returns the Source at that position.

Return

the current Source, or null if not available.